<?php

$sBasePath = dirname(dirname(__FILE__).DIRECTORY_SEPARATOR);
$aDatabase = require_once($sBasePath.'/config/server.php');

return array
(
    'basePath'          => $sBasePath,
    'name'              => '',
    'defaultController' => 'default',
    'theme'             => 'default',
    'language'          => 'ru',
    'import'            => array
    (
        'application.controllers.*',
        'application.components.*',
        'application.models.*',
        'application.extensions.upload.Upload'
    ),
    'modules' => array
    (
        'admin' => array
        (
            'access'             => array('administrator'),
            'layout'            => 'admin',
            'defaultController' => 'news'
        )
    ),
    'components' => array
    (
        'authManager'  => array
        (
            'class'           => 'CDbAuthManager',
            'connectionID'    => 'db',
            'itemTable'       => $aDatabase['tablePrefix'].'auth_item',
            'itemChildTable'  => $aDatabase['tablePrefix'].'auth_item_child',
            'assignmentTable' => $aDatabase['tablePrefix'].'auth_assignment',
            'defaultRoles'    => array('guest')
        ),
        'themeManager' => array
        (
            'themeClass' => 'CCustomTheme',
            'basePath'   => dirname(dirname(dirname(__FILE__))).'/themes/',
            'baseUrl'    => '/themes/'
        ),
        'db'   => $aDatabase,
        'user' => array
        (
            'class'          => 'CCustomWebUser',
            'allowAutoLogin' => true,
            'loginUrl'       => array('login')
        ),
        'urlManager' => array
        (
            'showScriptName' => false,
            'urlFormat'      => 'path',
            'urlSuffix'      => '.html',
            'rules'          => array
            (
                'login'  => 'default/login',
                'logout' => 'default/logout'
            )
        )
    )
);